package com.telecom.weixi.view;

import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.telecom.weixi.R;

public class Block1LineRowView extends LinearLayout {
	TextView tx;
	
	public Block1LineRowView(Context context) {
		this(context, null);
	}
	
	public Block1LineRowView(Context context, AttributeSet attrs) {
		super(context, attrs);
		
		setupView(context);
	}

	void setupView(Context context){
		LayoutInflater flater = LayoutInflater.from(context);
		flater.inflate(R.layout.block_1line_row, this);
		tx = (TextView) findViewById(R.id.content1);
	}
	
	public Block1LineRowView initContent(String content1, boolean isSingleLine){
		tx.setText(content1);
		if(isSingleLine){
			tx.setSingleLine(true);
			tx.setEllipsize(TextUtils.TruncateAt.END);
		}
		return this;
	}
	

}
